import request from '@/utils/request'

// 查询出库列表
export function listStoreOut(query) {
  return request({
    url: '/supplier/storeOut/list',
    method: 'get',
    params: query
  })
}

// 获取当前单号最大的值+1
export function generateNumber() {
  return request({
    url: '/supplier/businessNumber/generateStoreOutNumber' ,
    method: 'get'
  })
}

// 查询出库详细
export function getStoreOut(id) {
  return request({
    url: '/supplier/storeOut/' + id,
    method: 'get'
  })
}

// 新增出库
export function addStoreOut(data) {
  return request({
    url: '/supplier/storeOut',
    method: 'post',
    data: data
  })
}

// 修改出库
export function updateStoreOut(data) {
  return request({
    url: '/supplier/storeOut',
    method: 'put',
    data: data
  })
}

// 删除出库
export function delStoreOut(id) {
  return request({
    url: '/supplier/storeOut/' + id,
    method: 'delete'
  })
}

// 导出出库
export function exportStoreOut(query) {
  return request({
    url: '/supplier/storeOut/export',
    method: 'get',
    params: query
  })
}